/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jsf;
import ejb.Account;
import ejb.Customer;
import bean.AccountBean;
import bean.CustomerBean;
/**
 *
 * @author longdm0708l
 */

public class AdminControl {

    /** Creates a new instance of adminControl */
    public AdminControl() {
    }

    private Customer currentAdminProfile;
    private Account currentAccount;

    public Account getCurrentAccount() {
        return currentAccount;
    }

    public Customer getCurrentAdminProfile() {
        return currentAdminProfile;
    }

    public String updateAdmin()
    {
        CustomerBean customerBean = new CustomerBean();
        customerBean.editCustomer(currentAdminProfile);
        return "adminUser";
    }

    public String cancel()
    {
        return "adminUser";
    }

    public String toAdminProfile()
    {
        currentAccount = new Account();
        currentAdminProfile = new Customer();
        return "adminProfile";
    }
}
